package umacis.lwuitcomponent.property.controller;

import java.util.Vector;

import com.sun.lwuit.Component;
import com.sun.lwuit.Image;
import com.sun.lwuit.geom.Dimension;

public class SelectedStylePropertyController extends PropertyController {

	public SelectedStylePropertyController(Vector components, Vector parents) {
		name = "SelectedStyle";
		propertyGetterSetter = new PropertyGetterSetter[19];
		int i = 0;
		propertyGetterSetter[i++] =  new PropertyGetterSetter("BackgroundAlignment") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundAlignment((byte) parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundAlignment()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBgColor") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBgColor(parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBgColor()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBgImage") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBgImage((Image) parameters.object);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBgImage()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBackgroundType") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundType((byte) parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundType()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBackgroundGradientStartColor") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundGradientStartColor(parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundGradientStartColor()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBackgroundGradientEndColor") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundGradientEndColor( parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundGradientEndColor()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBackgroundGradientRelativeX") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundGradientRelativeX( parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundGradientRelativeX()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBackgroundGradientRelativeY") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundGradientRelativeY( parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundGradientRelativeY()						);} };
//		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBackgroundGradientRelativeSize") {	
//			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundGradientRelativeSize((byte) parameters.integer);	}   
//			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundGradientRelativeSize()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setFgColor") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundAlignment((byte) parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundAlignment()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setFont") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundAlignment((byte) parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundAlignment()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBgSelectionColor") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundAlignment((byte) parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundAlignment()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setFgSelectionColor") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundAlignment((byte) parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundAlignment()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBgTransparency") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundAlignment((byte) parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundAlignment()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBgColor") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundAlignment((byte) parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundAlignment()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBgImage") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundAlignment((byte) parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundAlignment()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setBorder") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundAlignment((byte) parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundAlignment()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setMargin") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundAlignment((byte) parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundAlignment()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setPadding") {	
			public void set(Component cmp, Parameters parameters) {			cmp.getSelectedStyle().setBackgroundAlignment((byte) parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	cmp.getSelectedStyle().getBackgroundAlignment()						);} };

	
		set(components, parents);
		new UnSelectedStylePropertyController(components, parents);
//		new ContainerPropertyController(components, parents);
//		new TextAreaPropertyController(components, parents);
//		new ListPropertyController(components, parents);
		parents.removeElement(this);
	}	
}
